﻿// DigitalDesign
// Project: InformationBoard
// Developer: Syzdykov Sergey
// Created: 09.11.2011
// Last change: 11.11.2011
// Description: class for sending on the client

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;

namespace Server
{
    [DataContract]
    public class ClientNotEF
    {
        [DataMember]
        public int Id { get; private set; }
        [DataMember]
        public bool PossibilityOfUpdateVideo { get; set; }
        [DataMember]
        public int PingFrequency { get; set; }
        [DataMember]
        public int ScreenshotFrequency { get; set; }
        [DataMember]
        public int VideoInterruptFrequency { get; set; }
        [DataMember]
        public ClassesOfPassengerNotEF ClassOfPassengers { get; set; }
        [DataMember]
        public string Ticker { get; set; }
        [DataMember]
        public LocationNotEF ClientLocation { get; set; }

        public ClientNotEF(ClientDevice clientDevice)
        {
            Id = clientDevice.Id;
            PossibilityOfUpdateVideo = clientDevice.PossibilityOfUpdateVideo;
            PingFrequency = clientDevice.PingFrequency;
            ScreenshotFrequency = clientDevice.ScreenshotFrequency;
            VideoInterruptFrequency = clientDevice.VideoInterruptFrequency;
            ClassOfPassengers = new ClassesOfPassengerNotEF(clientDevice.ClassesOfPassenger);
            Ticker = clientDevice.Ticker;
            ClientLocation = new LocationNotEF(clientDevice.Location);
        }

        public ClientNotEF() { }
    }
}
